package edu.njust.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.sql.Date;
import java.util.List;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class KlassReservation extends Reservation{
    private String course_name;
    private Date date;
    private Integer time_num;
    private boolean is_shared;

    public KlassReservation(String user_id, String name, Integer type, String course_name,
                     Date date, Integer time_num, boolean is_shared){
        super(user_id, name, type);
        this.course_name = course_name;
        this.date = date;
        this.time_num = time_num;
        this.is_shared = is_shared;
    }

    public Reservation toReservation(){
        Reservation reservation = new Reservation(this.getId(), this.getUser_id(), this.getName(), this.getState(), 1);
        return reservation;
    }
}
